﻿
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>登录</title>
    <link href="~/Content/themes/metro/easyui.css" rel="stylesheet" />
    <link href="~/Content/themes/icon.css" rel="stylesheet" />
    <script src="~/Content/jquery.min.js"></script>
    <script src="~/Content/jquery.easyui.min.js"></script>
    <script type="text/javascript">
        function login() {
            $("#login").form('submit', {
                success: function (data) {
                    data = eval("(" + data + ")");
                    if (data.result) {
                        topCenter("登录", "登录成功!");
                        window.location.href = "/Admin/Index";
                    }
                    else {
                        topCenter("登录", "登录失败!");
                    }
                }
            })
        }
        function topCenter(title, msg) {
            $.messager.show({
                title: title,
                msg: msg,
                showType: 'slide',
                timeout: 2000,
                style: {
                    right: '',
                    top: document.body.scrollTop + document.documentElement.scrollTop,
                    bottom: ''
                }
            });
        }
    </script>
</head>
<body>
    <div style="margin: auto;width:500px;">
        <h2>欢迎登录xxx系统</h2>
        <div style="margin:20px 0;"></div>
        <div class="easyui-panel" title="登录" style="width:100%;max-width:400px;padding:30px 60px;background-color: #f2f5f7;">
            <form id="login" method="post" action="/AdminLogin/UserLogin">
                <div style="margin-bottom:10px">
                    <input class="easyui-textbox" name="userName" style="width:100%;height:40px;padding:12px" data-options="prompt:'用户名',iconCls:'icon-man',iconWidth:38">
                </div>
                <div style="margin-bottom:20px">
                    <input class="easyui-textbox" name="password" type="password" style="width:100%;height:40px;padding:12px" data-options="prompt:'密码',iconCls:'icon-lock',iconWidth:38">
                </div>
            </form>
            <div>
                <a onclick="login()" class="easyui-linkbutton" data-options="iconCls:'icon-ok'" style="padding:5px 0px;width:100%;">
                    <span style="font-size:14px;">登录</span>
                </a>
            </div>
        </div>
    </div>
</body>
</html>
